---
layout: "default"
title: "toString"
description: "Swift documentation for 'toString': Returns the result of print&#39;ing x into a String."
keywords: "toString,func,swift,documentation"
root: "/v1.2"
---

<div class="declaration" id="func-tostring-t_-t">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-tostring-t_-t">@inline(never)  func toString&lt;T&gt;(<wbr>_: T)</a>
        
<div class="comment collapse" id="comment-func-tostring-t_-t"><div class="p">
    <p>Returns the result of <code>print</code>&#39;ing <code>x</code> into a <code>String</code></p>

    <h4>Declaration</h4>    
    <code class="language-swift">@inline(never)  func toString&lt;T&gt;(x: T) -&gt; String</code>
    
    
</div></div>
</div>
